<script setup lang="ts">
import { ref } from 'vue';
import A from './components/A.vue'
import Default from './components/Default.vue'
import router from './router/router';


const routerList = [
  { path: '/A', component: 'A.vue' },
  { path: '/B', component: 'B.vue' },
  { path: '/C', component: 'C.vue' },
]


const routerListFalse = [
  { path: '/B', component: 'B.vue' },
  { path: '/A', component: 'B.vue' },
]

routerList.forEach(item => {
  router.addRoute({
    path: item.path,
    component: () => import(`./components/${item.component}`)
  })
})
console.log(router);


</script>

<template >
  <div class="title">
    <Default :list="routerList" />
    <hr>
    <router-view></router-view>
  </div>


</template>

<style scoped lang="less">
</style>
